/*****************************************************************************

FileName: 	<common.h>

File Description:
Common Include Header File

*****************************************************************************/

#ifndef _COMMON_H
#define _COMMON_H


#include <string.h>


#define MAJOR 1
#define MINOR 0
#define REV   0
#define STEP  0


/*
* Trace program flow
*/

#ifdef TRACE
#define TRACER(_string_) printf("\n%s", _string_);
#else
#define TRACER(_string_)
#endif



/* 
* Initializes a data structure using a pointer to the structure.
* The initialization of OMX structures always sets up the nSize and nVersion fields 
*   of the structure.
*/
#define INIT_STRUCT_PTR(_s_, _name_)			\
	memset((_s_), 0x0, sizeof(_name_));			\
	(_s_)->nSize = sizeof(_name_);				\
	(_s_)->nVersion.s.nVersionMajor = MAJOR;	\
	(_s_)->nVersion.s.nVersionMinor = MAJOR;	\
	(_s_)->nVersion.s.nRevision = REV;			\
	(_s_)->nVersion.s.nStep = STEP


#endif


